import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server:{//中转服务器
    proxy:{
      '/mypath':{
        target:'http://127.0.0.1:5000',
        changeOrigin:true,
        rewrite:path=>path.replace(/^\/mypath/,'')
      },
      '/videopath':{
         target:"http://127.0.0.1:5000",
         changeOrigin:true,
         rewrite:path=>path.replace(/^\/videopath/,'')
       }
    }
  },
  configureServer: [
    function(app) {
      app.use('*.scss', require('sass-loader'));
    }
  ]
})
